﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HFK.DxFluentUI.LanguageModel;

namespace HFK.DxFluentUI.LanguageModel
{
  public class FeatureContext<NextStep> : FeatureActivationElement<NextStep>
  {
    #region public members

    public delegate NextStep AllowedImplementation();
    public delegate NextStep NotAllowedImplementation();

    public FeatureContext(AllowedImplementation allowedMethod, NotAllowedImplementation notAllowedMethod)
    {
      m_allowedMethod = allowedMethod;
      m_notAllowedMethod = notAllowedMethod;
    }

    #region FeatureActivationElement<NextStep> Members

    public NextStep Allowed()
    {
      return m_allowedMethod();
    }

    public NextStep NotAllowed()
    {
      return m_notAllowedMethod();
    }

    #endregion

    #endregion

    #region private members

    private AllowedImplementation m_allowedMethod;
    private NotAllowedImplementation m_notAllowedMethod;

    #endregion
  }
}
